<?php
/* [$WindsForce] (C)Hunzhiwange.COM Since 2014.09.10.
   个人空间显示($$)*/

!defined('Q_PATH') && exit;

class Teamshow_C_Controller extends InitController{

	public function index(){
		$arrJiajucompany=$this->_oParent->_arrJiajucompany;
		$nId=intval(Q::G('id','G'));

		if(!$nId){
			$this->page404();
		}

		// 设计师个人中心显示
		$arrWhere=array();
		$arrWhere['A.jiajudesigner_status']=1;
		$arrWhere['A.jiajudesigner_id']=$nId;
		$arrWhere['A.jiajucompany_id']=$arrJiajucompany['jiajucompany_id'];

		$arrDesigner=Model::F_('jiajudesigner','@A')
			->setColumns('A.jiajudesigner_name,A.jiajudesigner_id,A.jiajudesigner_position,A.jiajudesigner_type,A.user_id,A.jiajudesigner_style,A.jiajudesigner_year,A.jiajudesigner_school,A.jiajudesigner_about')
			->where($arrWhere)
			->getOne();

		if(empty($arrDesigner['jiajudesigner_id'])){
			$this->page404();
		}

		Core_Extend::getSeo($this,array(
			'title'=>$arrDesigner['jiajudesigner_name'].'-'.Jiaju_Extend::getDesignerType($arrDesigner['jiajudesigner_type']),
			'keywords'=>$arrDesigner['jiajudesigner_name'].','.Jiaju_Extend::getDesignerType($arrDesigner['jiajudesigner_type']),
			'description'=>$arrDesigner['jiajudesigner_name'].'-'.Jiaju_Extend::getDesignerType($arrDesigner['jiajudesigner_type']),
		));

		$this->assign('arrDesigner',$arrDesigner);
		$this->display(Jiaju_Extend::getTemplate($arrJiajucompany,'teamshow'));
	}

}
